﻿Imports IntoNails.DataAccess
Imports IntoNails.Models

Namespace ViewModel
    Public Class NailServiceViewModel
        Inherits SubWorkspaceViewModel

#Region "Fields"

        Private ReadOnly _bindingNailService As NailService
        Private ReadOnly _repository As NailServiceRepository

#End Region

#Region "Constructors"

        Public Sub New(ByVal nailService As NailService, ByVal repository As NailServiceRepository)
            _bindingNailService = nailService
            _repository = repository
        End Sub

#End Region

#Region "Properties"

        Public ReadOnly Property UniqueCode() As Integer
            Get
                Return _bindingNailService.UniqueCode
            End Get
        End Property

        Public Property ServiceName() As String
            Get
                Return _bindingNailService.Name
            End Get
            Set(ByVal value As String)
                _bindingNailService.Name = value
                Me.OnPropertyChanged("ServiceName")
            End Set
        End Property

        Public Property Price() As Double
            Get
                Return _bindingNailService.Price
            End Get
            Set(ByVal value As Double)
                _bindingNailService.Price = value
                Me.OnPropertyChanged("Price")
            End Set
        End Property

        Public Property IsValid() As Boolean
            Get
                Return _bindingNailService.IsValid
            End Get
            Set(ByVal value As Boolean)
                _bindingNailService.IsValid = value
                Me.OnPropertyChanged("IsValid")
            End Set
        End Property

        Public Property CategoryCode() As Integer
            Get
                Return _bindingNailService.CategoryCode
            End Get
            Set(ByVal value As Integer)
                _bindingNailService.CategoryCode = value
            End Set
        End Property

        Public Property DateChanged() As Date
            Get
                Return _bindingNailService.DateChanged
            End Get
            Set(ByVal value As Date)
                _bindingNailService.DateChanged = value
                OnPropertyChanged("DateChanged")
            End Set
        End Property

#End Region

    End Class
End Namespace
